import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Home-pc
 * Date: 2023-08-18
 * Time: 9:10
 */
public class Test1 {
    public static void main(String[] args) {
        String s1=new String("hello");
        String s2=new String("world");
        String s3=s1;
        System.out.println(s1);
        System.out.println(s2);
        System.out.println(s3);
        System.out.println(s1.length());//获取字符串长度
        System.out.println(s1.isEmpty());// 如果字符串长度为0，返回true，否则返回false
        System.out.println("******************");
        String S4="";//
        System.out.println(S4.length());
        System.out.println(S4.isEmpty());
        String s5=null;
        System.out.println(s5.isEmpty());
        System.out.println(s5.length());
    }
}
class Student{
    public String name="qwert";
    public int age=18;
}
class Test2{
    public static void main(String[] args) {

/*        String s3=new String("world");
        String s4=s1;
        System.out.println(s1==s2);
        System.out.println(s1==s4);
        System.out.println(s1==s3);
        String s5="ABC";
        String s6="ABC";
        System.out.println(s5==s6);
        System.out.println("**************");*/
/*        String s1=new String("helloqwertyui");

        System.out.println(s1.charAt(3));
        System.out.println(s1.indexOf("o"));
        System.out.println(s1.indexOf("w", 4));
        System.out.println(s1.indexOf("qwe"));
        System.out.println(s1.lastIndexOf("u"));
        System.out.println(s1.lastIndexOf("h", 5));*/


/*        System.out.println(String.valueOf(1234));
        System.out.println(String.valueOf(12.4));
        System.out.println(String.valueOf(true));
        System.out.println(String.valueOf(new Student()));*/

        /* System.out.println(Integer.valueOf("1234"));*/

/*        String s1="heLLo";
        char[] ch=s1.toCharArray();
        for (char x: ch) {
            System.out.print(" "+x);
        }
        System.out.println();
        String s2=new String(ch);
        System.out.println(s2);*/

        /*System.out.println(String.format("%d-%d-%d", 2023, 8, 18));*/


/*        String s1="helloohe";
        System.out.println(s1.replaceAll("he", "ab"));
        System.out.println(s1.replaceFirst("he", "ab"));*/


 /*       String str="192\\168\\\1";
        System.out.println(str);
        String[] s1=str.split("\\=|\\.");
        for (String x: s1) {
            System.out.print(" "+x);
        }
*/


/*        String str = "name=zhangsan&age=23";
        System.out.println(str.substring(3));
        System.out.println(str.substring(3, 6));*/


        final int array[]={1,2,3,4,5};
        array[0]=99;
        System.out.println(Arrays.toString(array));//引用对象中的内容是可以修改的
        //array=new int[]{1,2,3};//该引用变量不能引用其他对象

    }
}
